package com.redepronik.negosys.invfac.entity;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQuery;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * The persistent class for the pagocredito database table.
 * 
 */
@Entity
@Table(schema = "invfac", name = "pagocredito")
@NamedQuery(name = "Pagocredito.findAll", query = "SELECT p FROM Pagocredito p")
public class Pagocredito implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@SequenceGenerator(allocationSize = 1, name = "PAGOCREDITO_PAGOCREDITOID_GENERATOR", sequenceName = "INVFAC.PAGOCREDITO_PAGOCREDITOID_SEQ")
	@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "PAGOCREDITO_PAGOCREDITOID_GENERATOR")
	@Column(unique = true, nullable = false)
	private Integer pagocreditoid;

	private Boolean anulado;

	@Column(length = 100)
	private String banco;

	@Column(length = 50)
	private String chequevaucher;

	@Column(length = 50)
	private String cuentatarjeta;

	@Column(nullable = false, precision = 20, scale = 10)
	private BigDecimal cuota;

	@Column(length = 500)
	private String detalle;

	@Temporal(TemporalType.DATE)
	private Date fechacheque;

	@Temporal(TemporalType.DATE)
	private Date fechagiro;

	@Temporal(TemporalType.DATE)
	private Date fechapago;

	@Column(nullable = false)
	private Boolean pagado;

	// bi-directional many-to-one association to Detallecredito
	@ManyToOne
	@JoinColumn(name = "detallecreditoid", nullable = false)
	private Detallecredito detallecredito;

	// bi-directional many-to-one association to Tipopago
	@ManyToOne
	@JoinColumn(name = "tipopagoid", nullable = false)
	private Tipopago tipopago;

	public Pagocredito() {
	}

	public Boolean getAnulado() {
		return this.anulado;
	}

	public String getBanco() {
		return this.banco;
	}

	public String getChequevaucher() {
		return this.chequevaucher;
	}

	public String getCuentatarjeta() {
		return this.cuentatarjeta;
	}

	public BigDecimal getCuota() {
		return this.cuota;
	}

	public String getDetalle() {
		return this.detalle;
	}

	public Detallecredito getDetallecredito() {
		return this.detallecredito;
	}

	public Date getFechacheque() {
		return this.fechacheque;
	}

	public Date getFechagiro() {
		return this.fechagiro;
	}

	public Date getFechapago() {
		return this.fechapago;
	}

	public Boolean getPagado() {
		return this.pagado;
	}

	public Integer getPagocreditoid() {
		return this.pagocreditoid;
	}

	public Tipopago getTipopago() {
		return this.tipopago;
	}

	public void setAnulado(Boolean anulado) {
		this.anulado = anulado;
	}

	public void setBanco(String banco) {
		this.banco = banco;
	}

	public void setChequevaucher(String chequevaucher) {
		this.chequevaucher = chequevaucher;
	}

	public void setCuentatarjeta(String cuentatarjeta) {
		this.cuentatarjeta = cuentatarjeta;
	}

	public void setCuota(BigDecimal cuota) {
		this.cuota = cuota;
	}

	public void setDetalle(String detalle) {
		this.detalle = detalle;
	}

	public void setDetallecredito(Detallecredito detallecredito) {
		this.detallecredito = detallecredito;
	}

	public void setFechacheque(Date fechacheque) {
		this.fechacheque = fechacheque;
	}

	public void setFechagiro(Date fechagiro) {
		this.fechagiro = fechagiro;
	}

	public void setFechapago(Date fechapago) {
		this.fechapago = fechapago;
	}

	public void setPagado(Boolean pagado) {
		this.pagado = pagado;
	}

	public void setPagocreditoid(Integer pagocreditoid) {
		this.pagocreditoid = pagocreditoid;
	}

	public void setTipopago(Tipopago tipopago) {
		this.tipopago = tipopago;
	}

}